#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
using namespace std;

const int N = 1e6 + 10, INF = 0x3f3f3f3f;

int n, k;
vector<int> a;

void f(int l, int r)
{
    for (int i = l;i <= r;i++) cout << i << ' ';
}

void solve()
{
    cin >> n >> k;
    for (int i = 1;i <= n;i++) a.push_back(i);

    if ((n == 1 && k == 0) || k == n - 1) { cout << -1;return; }

    if (k == 0) {
        f(2, n);f(1, 1);
    } else if (k == n) {
        f(1, n);
    } else {
        f(1, k);
        f(n, n);
        f(k + 1, n - 1);
    }
}

signed main()
{
    //ios::sync_with_stdio(0);
    //cin.tie(0);cout.tie(0);
#define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
    std::istringstream in(R"()");
    std::cin.rdbuf(in.rdbuf());
#endif
    int T = 1;
    //cin>>T;
    for (int i = 1;i <= T;i++) {
        solve();
    }
}